package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.entity.ProductAttrValueEntity;
import com.atguigu.gulimall.product.vo.AttrRespVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author yangheng
 * @email sunlightcs@gmail.com
 * @date 2023-03-25 08:39:04
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttrWithRelation(AttrVo attr);

    PageUtils queryBaseAttr(Map<String, Object> params, long catelogId, String type);

    AttrRespVo getMoreDetail(Long attrId);

    void updateDetail(AttrVo attr);

    List<AttrEntity> getAllRelations(Long attrgroupId);

    PageUtils getNoRelations(Long attrgroupId, Map<String, Object> params);

    List<ProductAttrValueEntity> getSquBaseAttrById(Long spuId);

    List<Long> getSearchAttrIds(List<Long> attrIds);
}

